// Copyright (C) 2024 Kumo inc.
// Author: Jeff.li lijippy@163.com
// All rights reserved.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
//

#pragma once

#include <turbo/flags/declare.h>
#include <turbo/flags/flag.h>
#include <turbo/log/flags.h>
#include <set>
#include <llama.h>

TURBO_DECLARE_FLAG(int32_t, n_predict);

TURBO_DECLARE_FLAG(int32_t, n_ctx);

TURBO_DECLARE_FLAG(int32_t, n_batch);

TURBO_DECLARE_FLAG(int32_t, n_ubatch);

TURBO_DECLARE_FLAG(int32_t, n_keep);

TURBO_DECLARE_FLAG(int32_t, n_draft);

TURBO_DECLARE_FLAG(int32_t, n_chunks);

TURBO_DECLARE_FLAG(int32_t, n_parallel);

TURBO_DECLARE_FLAG(int32_t, n_sequences);

TURBO_DECLARE_FLAG(float, p_split);

TURBO_DECLARE_FLAG(int32_t, n_gpu_layers);

TURBO_DECLARE_FLAG(int32_t, n_gpu_layers_draft);

TURBO_DECLARE_FLAG(int32_t, main_gpu);

TURBO_DECLARE_FLAG(std::vector<std::string>, tensor_split);

TURBO_DECLARE_FLAG(int32_t, grp_attn_n);

TURBO_DECLARE_FLAG(int32_t, grp_attn_w);

TURBO_DECLARE_FLAG(int32_t, n_print);

TURBO_DECLARE_FLAG(float, rope_freq_base);

TURBO_DECLARE_FLAG(float, rope_freq_scale);

TURBO_DECLARE_FLAG(float, yarn_ext_factor);

TURBO_DECLARE_FLAG(float, yarn_attn_factor);

TURBO_DECLARE_FLAG(float, yarn_beta_fast);

TURBO_DECLARE_FLAG(float, yarn_beta_slow);

TURBO_DECLARE_FLAG(int32_t, yarn_orig_ctx);

TURBO_DECLARE_FLAG(float, defrag_thold);

TURBO_DECLARE_FLAG(std::string, model);

TURBO_DECLARE_FLAG(std::string, model_draft);
TURBO_DECLARE_FLAG(std::string, model_alias);
TURBO_DECLARE_FLAG(std::string, model_url);

TURBO_DECLARE_FLAG(std::string, hf_token);

TURBO_DECLARE_FLAG(std::string, hf_repo);

TURBO_DECLARE_FLAG(std::string, hf_file);

TURBO_DECLARE_FLAG(std::string, prompt);

TURBO_DECLARE_FLAG(std::string, prompt_file);

TURBO_DECLARE_FLAG(std::string, path_prompt_cache);

TURBO_DECLARE_FLAG(std::string, input_prefix);

TURBO_DECLARE_FLAG(std::string, input_suffix);
TURBO_DECLARE_FLAG(std::string, lookup_cache_static);
TURBO_DECLARE_FLAG(std::string, lookup_cache_dynamic);
TURBO_DECLARE_FLAG(std::string, rpc_servers);

TURBO_DECLARE_FLAG(std::vector<std::string>, in_files);
TURBO_DECLARE_FLAG(std::vector<std::string>, antiprompt);

TURBO_DECLARE_FLAG(bool, lora_init_without_apply);

TURBO_DECLARE_FLAG(bool, hellaswag);
TURBO_DECLARE_FLAG(size_t, hellaswag_tasks);

TURBO_DECLARE_FLAG(bool, winogrande);

TURBO_DECLARE_FLAG(size_t, winogrande_tasks);

TURBO_DECLARE_FLAG(bool, multiple_choice);

TURBO_DECLARE_FLAG(size_t, multiple_choice_tasks);

TURBO_DECLARE_FLAG(bool, kl_divergence);

TURBO_DECLARE_FLAG(int32_t, port);

TURBO_DECLARE_FLAG(int32_t, timeout_read);

TURBO_DECLARE_FLAG(int32_t, timeout_write);

TURBO_DECLARE_FLAG(int32_t, n_threads_http);

TURBO_DECLARE_FLAG(int32_t, n_threads);

TURBO_DECLARE_FLAG(int32_t, batch_n_threads);

TURBO_DECLARE_FLAG(int32_t, draft_n_threads);

TURBO_DECLARE_FLAG(int32_t, draft_batch_n_threads);

TURBO_DECLARE_FLAG(std::string, cpu_mask);

TURBO_DECLARE_FLAG(std::string, cpu_mask_batch);

TURBO_DECLARE_FLAG(std::string, cpu_mask_draft);
TURBO_DECLARE_FLAG(std::string, cpu_mask_batch_draft);
TURBO_DECLARE_FLAG(std::string, cpu_range);

TURBO_DECLARE_FLAG(std::string, cpu_range_batch);

TURBO_DECLARE_FLAG(std::string, cpu_range_draft);

TURBO_DECLARE_FLAG(std::string, cpu_range_batch_draft);

TURBO_DECLARE_FLAG(bool, strict_cpu);

TURBO_DECLARE_FLAG(bool, strict_cpu_batch);

TURBO_DECLARE_FLAG(bool, strict_cpu_draft);

TURBO_DECLARE_FLAG(bool, strict_cpu_batch_draft);

TURBO_DECLARE_FLAG(int32_t, cpu_priority);

TURBO_DECLARE_FLAG(int32_t, cpu_priority_batch);

TURBO_DECLARE_FLAG(int32_t, cpu_priority_draft);

TURBO_DECLARE_FLAG(int32_t, cpu_priority_batch_draft);

TURBO_DECLARE_FLAG(int32_t, cpu_poll);

TURBO_DECLARE_FLAG(int32_t, cpu_poll_batch);

TURBO_DECLARE_FLAG(int32_t, cpu_poll_draft);

TURBO_DECLARE_FLAG(int32_t, cpu_poll_batch_draft);

TURBO_DECLARE_FLAG(int32_t, n_cache_reuse);

TURBO_DECLARE_FLAG(bool, escape);

TURBO_DECLARE_FLAG(bool, multiline_input);

TURBO_DECLARE_FLAG(bool, simple_io);

TURBO_DECLARE_FLAG(bool, cont_batching);

TURBO_DECLARE_FLAG(bool, flash_attn);

TURBO_DECLARE_FLAG(bool, no_perf);

TURBO_DECLARE_FLAG(bool, ctx_shift);

TURBO_DECLARE_FLAG(std::string, out_file);

TURBO_DECLARE_FLAG(int32_t, n_out_freq);

TURBO_DECLARE_FLAG(int32_t, n_save_freq);
TURBO_DECLARE_FLAG(int32_t, i_chunk);
TURBO_DECLARE_FLAG(bool, process_output);
TURBO_DECLARE_FLAG(bool, compute_ppl);

TURBO_DECLARE_FLAG(bool, embedding);

TURBO_DECLARE_FLAG(int32_t, embd_normalize);
TURBO_DECLARE_FLAG(std::string, embd_out);
TURBO_DECLARE_FLAG(std::string, embd_sep);

TURBO_DECLARE_FLAG(bool, reranking);

TURBO_DECLARE_FLAG(int32_t, n_junk);

TURBO_DECLARE_FLAG(int32_t, i_pos);

TURBO_DECLARE_FLAG(std::string, mmproj);

TURBO_DECLARE_FLAG(std::vector<std::string>, image);

TURBO_DECLARE_FLAG(int32_t, control_vector_layer_start);

TURBO_DECLARE_FLAG(int32_t, control_vector_layer_end);

TURBO_DECLARE_FLAG(int32_t, ppl_stride);

TURBO_DECLARE_FLAG(int32_t, ppl_output_type);

TURBO_DECLARE_FLAG(int32_t, n_pca_batch);

TURBO_DECLARE_FLAG(int32_t, n_pca_iterations);

TURBO_DECLARE_FLAG(std::string, cvector_outfile);
TURBO_DECLARE_FLAG(std::string, cvector_positive_file);

TURBO_DECLARE_FLAG(std::string, cvector_negative_file);

TURBO_DECLARE_FLAG(bool, spm_infill);

TURBO_DECLARE_FLAG(std::string, lora_outfile);

TURBO_DECLARE_FLAG(std::string, cache_type_k);

TURBO_DECLARE_FLAG(std::string, cache_type_v);

TURBO_DECLARE_FLAG(std::string, hostname);

TURBO_DECLARE_FLAG(std::string, public_path);

TURBO_DECLARE_FLAG(std::string, chat_template);

TURBO_DECLARE_FLAG(bool, enable_chat_template);

TURBO_DECLARE_FLAG(std::vector<std::string>, api_keys);

TURBO_DECLARE_FLAG(std::string, ssl_file_key);

TURBO_DECLARE_FLAG(std::string, ssl_file_cert);

TURBO_DECLARE_FLAG(bool, webui);

TURBO_DECLARE_FLAG(bool, endpoint_slots);

TURBO_DECLARE_FLAG(bool, endpoint_props);

TURBO_DECLARE_FLAG(bool, endpoint_metrics);

TURBO_DECLARE_FLAG(bool , is_pp_shared);

TURBO_DECLARE_FLAG(bool , input_prefix_bos);

TURBO_DECLARE_FLAG(bool , logits_all);

TURBO_DECLARE_FLAG(bool , use_mmap);

TURBO_DECLARE_FLAG(bool , use_mlock);

TURBO_DECLARE_FLAG(bool , verbose_prompt);
TURBO_DECLARE_FLAG(bool , display_prompt);

TURBO_DECLARE_FLAG(bool , dump_kv_cache);
TURBO_DECLARE_FLAG(bool , no_kv_offload);
TURBO_DECLARE_FLAG(bool , warmup);
TURBO_DECLARE_FLAG(bool , check_tensors);

TURBO_DECLARE_FLAG(std::string, slot_save_path);

TURBO_DECLARE_FLAG(bool , log_json);

TURBO_DECLARE_FLAG(float , slot_prompt_similarity);

TURBO_DECLARE_FLAG(std::vector<std::string>, context_files);

TURBO_DECLARE_FLAG(int32_t, chunk_size);

TURBO_DECLARE_FLAG(std::string , chunk_separator);


TURBO_DECLARE_FLAG(std::vector<std::string> , n_pp);
TURBO_DECLARE_FLAG(std::vector<std::string> , n_tg);
TURBO_DECLARE_FLAG(std::vector<std::string> , n_pl);

TURBO_DECLARE_FLAG(bool , batched_bench_output_jsonl);

TURBO_DECLARE_FLAG(bool , use_color);

TURBO_DECLARE_FLAG(bool , special);

TURBO_DECLARE_FLAG(bool , interactive);

TURBO_DECLARE_FLAG(bool , interactive_first);

TURBO_DECLARE_FLAG(bool , conversation);

TURBO_DECLARE_FLAG(bool , prompt_cache_all);

TURBO_DECLARE_FLAG(bool , prompt_cache_ro);

//TURBO_DECLARE_FLAG(std::set<int>, examples);

//TURBO_DECLARE_FLAG(int32_t , verbosity);

TURBO_DECLARE_FLAG(int32_t , numa);
TURBO_DECLARE_FLAG(int32_t , split_mode);

namespace  kllm {


}  // namespace kllm

